File manager - Edit - /home/autoph/public_html/projects/event-registration-api/app/Models/SmsQueue.php
Back
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class SmsQueue extends Model { use HasFactory; protected $table = "golf_sms_send"; public $timestamps = false; /** * The attributes that are mass assignable. * * @var array<int, string> */ protected $guarded = [ ]; /** * The attributes that should be cast. * * @var array<string, string> */ protected $casts = [ ]; protected $appends = ['event','sms_template']; public function getSmsTemplateAttribute() { $data = $this->data ? json_decode($this->data, true) : [] ; $template = SmsTemplate::where("id", '=', $data['sms_settings_id'] ?? 0)->first(); return $template; } public function getEventAttribute() { $data = $this->data ? json_decode($this->data, true) : [] ; $event = Event::where("id", '=', $data['event_id'] ?? 0)->first(); return $event; } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings